﻿@model IEnumerable<BatsMVCPortal.Models.Video>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            Topic
        </th>
        <th>
            VideoName
        </th>
        <th>
            VideoDescription
        </th>
        <th>
            UserId
        </th>
        <th>
            VideoRating
        </th>
        <th>
            VideoURL
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Topic.TopicType)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.VideoName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.VideoDescription)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.UserId)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.VideoRating)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.VideoURL)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.VideoID }) |
            @Html.ActionLink("Details", "Details", new { id=item.VideoID }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.VideoID })
        </td>
    </tr>
}

</table>
